package com.blb.community.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;
import java.math.BigInteger;
import java.time.LocalDateTime;
import java.util.List;

@Data
@AllArgsConstructor
@TableName(value = "zy_community")
public class Community implements Serializable {
    @TableId(value = "community_id")
    @JsonSerialize(using= ToStringSerializer.class)
    private BigInteger communityId;
    private String communityName;
    private String communityCode;
    private String communityProvenceCode;
    private String communityCityCode;
    private String communityTownCode;
    private String communityDetailedAddress;
    private String communityLongitude;
    private String communityLatitude;
    private BigInteger deptId;
    private int communitySort;
    private String createBy;
//    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
//    @JsonSerialize(using = LocalDateTimeSerializer.class)
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;
    private String updateBy;
//    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
//    @JsonSerialize(using = LocalDateTimeSerializer.class)
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime updateTime;
    private String remark;
    @TableField(exist = false)
    private List<Building> buildings;


    @TableField(exist = false)
    private String provinceArea;
    @TableField(exist = false)
    private String cityArea;
    @TableField(exist = false)
    private String townArea;

    public Community() {
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public void setCommunityName(String communityName) {
        this.communityName = communityName;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public void setCommunityId(BigInteger communityId) {
        this.communityId = communityId;
    }

    public String getProvinceArea() {
        return provinceArea;
    }

    public void setProvinceArea(String provinceArea) {
        this.provinceArea = provinceArea;
    }

    public String getCityArea() {
        return cityArea;
    }

    public void setCityArea(String cityArea) {
        this.cityArea = cityArea;
    }

    public String getTownArea() {
        return townArea;
    }

    public void setTownArea(String townArea) {
        this.townArea = townArea;
    }

    public BigInteger getCommunityId() {
        return communityId;
    }

    public String getCommunityName() {
        return communityName;
    }

    public String getCommunityCode() {
        return communityCode;
    }

    public String getCommunityProvenceCode() {
        return communityProvenceCode;
    }

    public String getCommunityCityCode() {
        return communityCityCode;
    }

    public String getCommunityTownCode() {
        return communityTownCode;
    }

    public String getCommunityDetailedAddress() {
        return communityDetailedAddress;
    }

    public String getCommunityLongitude() {
        return communityLongitude;
    }


    public BigInteger getDeptId() {
        return deptId;
    }

    public int getCommunitySort() {
        return communitySort;
    }

    public String getCreateBy() {
        return createBy;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public String getRemark() {
        return remark;
    }
}
